package com.example.multiple.service;

import com.example.multiple.domain.master.Log;
import com.example.multiple.domain.slave.Logger;
import com.example.multiple.mapper.master.MasterMapper;
import com.example.multiple.mapper.slave.SlaveMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DatasourceService {

    @Resource
    private MasterMapper masterMapper;

    @Resource
    private SlaveMapper slaveMapper;

    public void handle(){
        List<Log> masterList = masterMapper.select();
        List<Logger> slaveList = slaveMapper.select();
        System.out.println(masterList);
        System.out.println(slaveList);
    }
}
